package com.foreknow.trains.train7;

public class Rect extends Shape{
    private double a;//长
    private double b;//宽

    public double getWidth() {
        return a;
    }

    public void setWidth(double a) {
        this.a = a;
    }

    public double getHeight() {
        return b;
    }

    public void setHeight(double b) {
        this.b = b;
    }

    @Override
    public void getArea() {
        int area = (int) (a*b);
        System.out.println("长方形的面积："+area);
        super.getArea();
    }
}
